Allow stock transfer to merge into existing stock (optional) #6951#12022
Allow stock transfer to merge into existing stock (optional) #6951#12022neilbeukes wants to merge 12 commits into
Conversation
✅ Deploy Preview for inventree-web-pui-preview canceled.
|
|
Oh I see some builds failing, ill take a look at those. I'm assuming I need to also update docs with added functionality. |
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## master #12022 +/- ##
=======================================
Coverage 91.42% 91.43%
=======================================
Files 974 974
Lines 51915 51995 +80
=======================================
+ Hits 47465 47541 +76
- Misses 4450 4454 +4
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
|
| if other.location: | ||
| location_note = _('Transferred from %(location)s') % { | ||
| 'location': other.location.pathstring | ||
| } | ||
|
|
||
| notes = f'{notes}\n{location_note}' if notes else location_note |
There was a problem hiding this comment.
This feels like it will be very hard to trace back and also like a data loss
There was a problem hiding this comment.
Any newlines are stripped out from char fields too
|
@neilbeukes looking good! Only issue is that the code is not meeting style guidelines:
If you run |
Hi @SchrodingersGat. I would expect this to automatically run on commit as per the docs. Is there a way I can run that manually? I dont see any scripts in package.json or as a invoke-able task. Thanks, |
It will, after you install the pre-commit hooks: https://docs.inventree.org/en/stable/develop/contributing/#setup-devtools After this, any git commit will automatically format the code.
Yes, you can replicate what the pre commit file is doing |
I see, I did setup dev tools and have had all the pre-checks running everytime I commit but it doesnt seem to pick up those formatting.
Ill look into the more this weekend, maybe I can see why its not running as intended. |




As requested in #6951, I am providing an option when transferring stock between locations, to optionally merge into the first available stock of the same type (of part).
New parts added.
This is will change existing behavior as follows.
If merge is toggled
If merged is not toggled
Some images:
Global settings

Modal with merge enabled on transfer

Middle event is an example of a merged transfer
